package com.tebiecloud.act.client.service;

import com.tebiecloud.act.client.model.entity.ActGoodsRef;
import com.tebiecloud.common.model.ResultBody;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 活动关联的商品接口
 * @Author: tebie
 * @Date: 2019-09-16 20:23
 */
public interface IActGoodsRefServiceClient {

    /**
     * 根据活动id查询
     * @param actId
     * @param goodsSpecificationId
     * @return
     */
    @PostMapping("/feign/actgoods/listActGoodsRef")
    ResultBody<List<ActGoodsRef>> listActGoodsRef(@RequestParam("actId") long actId,
                                                      @RequestParam("goodsSpecificationId") long goodsSpecificationId);

    /**
     * 根据商品id查询关联的活动
     * @param goodsId 商品id
     * @param actType 活动类型：1促销，2体验
     * @return
     */
    @PostMapping("/feign/actgoods/listActGoodsRefByGoodsId")
    ResultBody<List<ActGoodsRef>> listActGoodsRefByGoodsId(@RequestParam("goodsId") long goodsId,
                                                           @RequestParam(value = "actType",required = false) Integer actType);

    /**
     * 查询某个活动的某个商品规格列表
     * @param actId
     * @param goodsId
     * @return
     */
    @PostMapping("/feign/actgoods/listActGoodsRefByActIdAndGoodsId")
    ResultBody<List<ActGoodsRef>> listActGoodsRefByActIdAndGoodsId(@RequestParam("actId") long actId,
                                                  @RequestParam("goodsId") long goodsId);
}
